// 最小生成树-普里姆算法测试
#include <iostream>
#include "./model/mgraph.h"
#include "./util/min_span_tree.h"

using namespace std;

int main()
{
	MGraph graph;
	createGraph(graph, UN_DIRECT, TYPE_NET);
	// 加入点和边
	insertVex(graph, 'a');
	insertVex(graph, 'b');
	insertVex(graph, 'c');
	insertVex(graph, 'd');
	insertVex(graph, 'e');
	insertVex(graph, 'f');
	insertArc(graph, 0, 1, 6);
	insertArc(graph, 0, 2, 1);
	insertArc(graph, 0, 3, 5);
	insertArc(graph, 1, 2, 5);
	insertArc(graph, 2, 3, 5);
	insertArc(graph, 1, 4, 3);
	insertArc(graph, 2, 4, 6);
	insertArc(graph, 2, 5, 4);
	insertArc(graph, 3, 5, 2);
	insertArc(graph, 4, 5, 6);
	printGraph(graph);
	prim(graph);
	return 0;
}